import DASH_BOARD from '../views/Dashboard/dashboard.vue'
export default [
  /* {
    path: '/',
    redirect: '/index',
    hideInMenu: true,
  }, */
  {
    path: '/login',
    name: 'login',
    hideInMenu: true,
    meta: {
      title: '登录',
      icon: 'login',
    },
    component: () => import(/*  webpackChunkName: "login" */ '../views/Login/Login.vue'),
  },
  {
    path: '/',
    component: () => import(/*  webpackChunkName: "home" */ '../views/Index/index.vue'),
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          title: '首页',
          icon: 'home',
          auth: ['0'],
        },
        component: { render: (h) => h('router-view') },
        children: [
          {
            path: '/index',
            name: 'index',
            meta: {
              title: '工作台',
              icon: 'login',
              auth: ['0'],
            },
            component: DASH_BOARD,
          },
        ],
      },
      {
        path: '/ad',
        name: 'ad',
        meta: {
          title: '广告管理',
          icon: 'gift',
          auth: ['0', '2'],
        },
        component: { render: (h) => h('router-view') },
        children: [
          {
            path: '/plan',
            name: 'plan',
            meta: {
              title: '计划',
              icon: 'login',
              auth: ['0'],
            },
            component: () => import(/*  webpackChunkName: "plan" */ '../views/Advertising/Plan.vue'),
          },
          {
            path: '/material',
            name: 'material',
            meta: {
              title: '素材',
              icon: 'login',
              auth: ['0'],
            },
            component: () => import(/*  webpackChunkName: "material" */ '../views/Advertising/Material.vue'),
          },
          {
            path: '/data',
            name: 'data',
            meta: {
              title: '数据',
              icon: 'login',
              auth: ['0', '2'],
            },
            component: () => import(/*  webpackChunkName: "data" */ '../views/Advertising/Data.vue'),
          },
        ],
      },
      {
        path: '/media-man',
        name: 'media-man',
        meta: {
          title: '媒体平台',
          icon: 'global',
          auth: ['0', '1'],
        },
        component: { render: (h) => h('router-view') },
        children: [
          {
            path: '/media',
            name: 'media',
            meta: {
              title: '媒体',
              icon: 'login',
              auth: ['0'],
            },
            component: () => import(/*  webpackChunkName: "media" */ '../views/MediaMan/Media.vue'),
          },
          {
            path: '/advertising',
            name: 'advertising',
            meta: {
              title: '广告位',
              icon: 'login',
              auth: ['0'],
            },
            component: () => import(/*  webpackChunkName: "advertising" */ '../views/MediaMan/AdvertisingIndex.vue'),
          },
          {
            path: '/media-data',
            name: 'media-data',
            meta: {
              title: '媒体数据',
              icon: 'login',
              auth: ['0'],
            },
            component: () => import(/*  webpackChunkName: "media-data" */ '../views/MediaMan/MediaData.vue'),
          },
          {
            // path: '/advertising-data/:id',
            path: '/advertising-data',
            name: 'advertising-data',
            meta: {
              title: '广告位数据',
              icon: 'login',
              auth: ['0'],
            },
            component: () => import(/*  webpackChunkName: "advertising-data" */ '../views/MediaMan/AdvertisingData.vue'),
          },
          {
            path: '/media-income-list',
            name: 'media-income-list',
            meta: {
              title: '媒体收入数据',
              icon: 'login',
              auth: ['1'],
            },
            component: () => import(/*  webpackChunkName: "advertising-data" */ '../views/MediaMan/MediaIncomeList.vue'),
          },
          {
            path: '/adv-income-list',
            name: 'adv-income-list',
            meta: {
              title: '广告位收入数据',
              icon: 'login',
              auth: ['1'],
            },
            component: () => import(/*  webpackChunkName: "advertising-data" */ '../views/MediaMan/AdvIncomeList.vue'),
          },
        ],
      },
      {
        path: '/adver-man',
        name: 'adver-man',
        meta: {
          title: '活动管理',
          icon: 'global',
          auth: ['0'],
        },
        component: { render: (h) => h('router-view') },
        children: [
          {
            path: '/adver',
            name: 'adver',
            meta: {
              title: '活动',
              icon: 'login',
            },
            component: () => import(/*  webpackChunkName: "adver" */ '../views/AdverMan/Adver.vue'),
          },
        ],
      },
      {
        path: '/system',
        name: 'system',
        meta: {
          title: '系统管理',
          icon: 'home',
          auth: ['0'],
        },
        children: [
          {
            path: '/account',
            name: 'account',
            meta: {
              title: '账号管理',
              icon: 'login',
            },
            component: () => import(/*  webpackChunkName: "account" */ '../views/SystemMan/AccountMan.vue'),
          },
        ],
        component: { render: (h) => h('router-view') },
      },
      {
        path: '/details',
        name: 'details',
        hideInMenu: true,
        meta: {
          title: '趣场景',
          icon: 'detailManagement',
        },
        component: { render: (h) => h('router-view') },
        children: [
          {
            path: '/data-detail',
            name: 'data-detail',
            meta: {
              title: '详细数据',
              icon: 'data-detail',
            },
            component: () => import(/*  webpackChunkName: "data-detail" */ '../views/Advertising/DataDetail.vue'),
          },
          {
            path: '/material-edit',
            name: 'material-edit',
            meta: {
              title: '编辑',
            },
            component: () => import(/*  webpackChunkName: "material-edit" */ '../views/Advertising/MaterialEdit.vue'),
          },
          {
            path: '/material-create',
            name: '/material-create',
            meta: {
              title: '新建',
            },
            component: () => import(/*  webpackChunkName: "material-create" */ '../views/Advertising/MaterialCreate.vue'),
          },
          {
            path: '/plan-create',
            name: 'plan-create',
            meta: {
              title: '新建',
            },
            component: () => import(/*  webpackChunkName: "plan-create" */ '../views/Advertising/PlanCreate.vue'),
          },
          {
            path: '/plan-edit',
            name: 'plan-edit',
            meta: {
              title: '编辑',
            },
            component: () => import(/*  webpackChunkName: "plan-detail" */ '../views/Advertising/PlanEdit.vue'),
          },
        ],
      },
    ],
  },
]
